package JVM;

import java.util.HashSet;
import java.util.Set;

// java.lang.OutOfMemoryError: PermGen space
public class RuntimeConstantPoolOOM {
    public static void main(String[] args) {
        Set<String> set = new HashSet<>();
        short i = 0;
        while(true){
            set.add(String.valueOf(i++).intern());
        }

    }

}
